Skip to content

feat(minibf): implement /epochs/{number}/stakes/{pool_id} endpoint (#1101) - #1154

Merged
scarmuega merged 1 commit into
mainfrom
mmahut/epoch-pool-stakes
Aug 13, 2026
Merged

feat(minibf): implement /epochs/{number}/stakes/{pool_id} endpoint (#1101)#1154
scarmuega merged 1 commit into
mainfrom
mmahut/epoch-pool-stakes

Conversation

@mmahut

@mmahut mmahut commented Jul 31, 2026

Copy link
Copy Markdown
Contributor

Resolves #1101.

Implements /epochs/{number}/stakes/{pool_id} (#1101).

Same scan as /epochs/{number}/stakes in the base PR, filtered by pool. The pool lives in the log value rather than the key (keeping per-account history a point read), so this endpoint scans the epoch and filters.

Verified against hosted Blockfrost on preview.

@mmahut
mmahut requested a review from scarmuega as a code owner July 31, 2026 22:43
@coderabbitai

coderabbitai Bot commented Jul 31, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@scarmuega, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 29 minutes

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: f15f86ea-5f69-42ed-8529-dae7778486da

📥 Commits

Reviewing files that changed from the base of the PR and between aa85722 and 57b7baa.

📒 Files selected for processing (4)
  • crates/minibf/src/lib.rs
  • crates/minibf/src/routes/epochs/mod.rs
  • crates/minibf/src/routes/pools.rs
  • docs/content/apis/minibf.mdx

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@mmahut
mmahut requested a review from Copilot July 31, 2026 22:43
@mmahut
mmahut force-pushed the mmahut/epoch-pool-stakes branch from dd12c0c to d4b274f Compare July 31, 2026 22:45

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds the Blockfrost-compatible GET /epochs/{epoch}/stakes/{pool_id} endpoint to the minibf service, extending the existing epoch stake distribution scan with a pool filter (matching the current AccountStakeLog storage layout where pool_id is in the log value).

Changes:

  • Implement by_number_stakes_pool handler to scan epoch stake logs and filter rows by pool_id.
  • Register the new route in the Axum router and add endpoint documentation.
  • Expose decode_pool_id within the crate and add tests for happy-path + error cases + pagination.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.

File Description
docs/content/apis/minibf.mdx Documents the newly supported endpoint in the minibf API list.
crates/minibf/src/routes/pools.rs Makes decode_pool_id available for reuse by other route modules.
crates/minibf/src/routes/epochs/mod.rs Adds the new pool-scoped epoch stakes handler plus comprehensive tests.
crates/minibf/src/lib.rs Registers /epochs/{epoch}/stakes/{pool_id} in the router.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

where
Option<PoolState>: From<D::Entity>,
{
let pagination = Pagination::try_from(params)?;
@mmahut mmahut added area:minibf Mini Blockfrost (minibf) API enhancement New feature or request labels Aug 6, 2026
@scarmuega
scarmuega requested a review from a team as a code owner August 13, 2026 10:52
@scarmuega
scarmuega force-pushed the mmahut/epoch-pool-stakes branch from d4b274f to c031e97 Compare August 13, 2026 10:52
@scarmuega
scarmuega force-pushed the mmahut/epoch-pool-stakes branch from c031e97 to 5b16dd0 Compare August 13, 2026 11:54
@scarmuega
scarmuega force-pushed the mmahut/epoch-pool-stakes branch from 5b16dd0 to 6807574 Compare August 13, 2026 11:58
Base automatically changed from mmahut/epoch-stakes to main August 13, 2026 11:59
@scarmuega
scarmuega force-pushed the mmahut/epoch-pool-stakes branch from 6807574 to 57b7baa Compare August 13, 2026 11:59
@scarmuega
scarmuega merged commit b42ed45 into main Aug 13, 2026
17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:minibf Mini Blockfrost (minibf) API enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

minibf: add /epochs/<number>/stakes/<pool>

3 participants